import { ajax } from '../libs/ajax.js';
import { tools } from '../libs/tools.js';

let btnBack = document.getElementById('btnBack');
let div_intro = document.getElementById('div_intro');
let title = document.querySelector('title');

let ftid = location.search.replace('?ftid=','');

ajax.get(`/crud/footballteam/${ftid}`,{},(data)=>{
  if (!data.success) {
    alert(data.message);
    return;
  }
  let intro = data.data;
  div_intro.innerHTML = intro.intro;
  title.innerHTML = intro.tname;
})

btnBack.addEventListener('click',()=>{
  location.href = 'fbt.html';
})